As a magnetic sensor advantageous for size reduction and high-accuracy detection, there has been used a magnetic sensor which includes an MR element (Magnetoresistance effect element or magnetoresistance element) formed using a magnetoresistance effect film formed in an elongated pattern or shape extending in a certain direction and which is configured to provide an output corresponding to an applied external magnetic field from an output terminal when voltage is applied between a power supply terminal and a ground terminal (refer to, e.g., PTL 1 and PTL 2). For such a magnetic sensor, further miniaturization is now required.
For example, a small camera incorporated in a mobile terminal device (mobile phone, smart phone, mobile personal computer, etc.) uses an actuator for developing driving force causing an optical lens (or optical lens group) to move in the optical axis direction in order to achieve an autofocus function or an optical zoom function. To such an actuator is input a position detection signal output from a linear encoder having a structure formed by a combination of a magnetic sensor using the above-mentioned MR element and a multipolar magnet. To obtain a high-accuracy autofocus function or a high-accuracy optical zoom function, it is necessary to perform control for moving an optical lens at a very fine pitch. Accordingly, to enhance position detection accuracy, narrowing of magnetization pitch of the multipolar magnet and thus narrowing of arrangement pitch of resistor elements including the MR elements is required in the linear encoder.
As described above, further narrowing of the arrangement pitch of the resistor elements such as the MR elements is required for the magnetic sensor used to constitute the linear encoder or a rotary encoder operating under the same principle. The narrowing of the arrangement pitch of the resistor elements such as the MR elements contributes also to miniaturization of the magnetic sensor.
As a magnetoresistance effect film constituting the MR element used in such a magnetic sensor, an Ni—Fe alloy film and an Ni—Fe—Co alloy film capable of bringing out an anisotropic magnetoresistance effect (AMR effect) and capable of being formed in a single layer can be used (refer to, e.g., PTL 3).